package com.bowos.zmado.dao;

import com.bowos.zmado.model.User;
import com.orifine.dao.annotation.Insert;
import com.orifine.dao.annotation.Param;
import com.orifine.dao.annotation.Select;

public interface UserDao {
	@Select
	public User getUserById(@Param("id") int userId);

	@Insert(value="INSERT INTO User(id, username, password, email)", useGeneratedKeys=true, keyColumnLabel="id", keyFieldProperty="id")
	public boolean insertUser(User user);

	@Select("SELECT username, password FROM User WHERE username=#{$1}")
	public User getUserByUsername(String username);
	
	public User getUser();
}
